<?php

namespace App\Models;

use App\Models\Traits\ProjectTrait;
use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\ColumnMeta
 *
 * @property int $id
 * @property int $project_id 项目ID
 * @property int $column_id 列ID
 * @property string $key meta键
 * @property string $value meta值
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ColumnMeta newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ColumnMeta newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ColumnMeta query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ColumnMeta whereColumnId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ColumnMeta whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ColumnMeta whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ColumnMeta whereKey($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ColumnMeta whereProjectId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ColumnMeta whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ColumnMeta whereValue($value)
 * @mixin \Eloquent
 * @property-read \App\Models\Column $column
 * @property-read \App\Models\Project $project
 */
class ColumnMeta extends Model
{
    use ProjectTrait;

    protected $fillable = [
        'project_id', 'column_id', 'key', 'value'
    ];
    
    public function column()
    {
        return $this->belongsTo(Column::class);
    }
}
